Converts a value returned from a LearningStore query to a given type, or null if the value is DBNull.
Parent Type: LearningStoreHelper
Namespace: Microsoft.SharePointLearningKit
Assembly: Microsoft.SharePointLearningKit.dll
| C# |
|
public static void Cast<T> ( ) where T : struct |
T
The type to convert to.
value
A value from a DataRow within a DataTable returned from a LearningStore query.
result
Where to store the result. value is cast to the type of result, or is set to null if value is DBNull.
This version of Cast is used to retrieve a value type from LearningStore, i.e. bool, DateTime, float, double, Guid, int, or an enumerated type. The output parameter must be a nullable type; if the input value is the database "NULL" value, then null is stored in the output parameter.